package com.hsh.service.impl;

import com.hsh.dao.impl.AddFavorDaoImpl;
import com.hsh.dao.impl.GetFavorDaoImpl;
import com.hsh.service.ClickFavorService;

public class ClickFavorServiceImpl implements ClickFavorService {
    @Override
    public int clickFavor(int bid) {
        boolean flag = new AddFavorDaoImpl().addFavorById(bid);
        if(flag){
            return  new GetFavorDaoImpl().getFavorById(bid);
        }
        return 0;
    }
}
